package demoxsgl_300.com.jj0588.adapter;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import demoxsgl_300.com.jj0588.R;
import demoxsgl_300.com.jj0588.base.BaseApplication;
import demoxsgl_300.com.jj0588.base.Base_Z_Adapter;


/**
 * Created by 他的猫 on 2016/12/3.
 * 排名适配器
 */

public class Event_Adapter extends Base_Z_Adapter {
    Event_Adapter.Holder holder;

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {

        // 查找控件
        if (null == convertView) {
            convertView = LayoutInflater.from(BaseApplication.getInstance())
                    .inflate(R.layout.tab_item_1_event, null);
            holder = new Event_Adapter.Holder();
            holder.tv_rname = (TextView) convertView
                    .findViewById(R.id.tv_name);


            // 缓存Holder
            convertView.setTag(holder);
        } else {
            holder = (Event_Adapter.Holder) convertView.getTag();
        }
        String item = (String) getItem(position);
        holder.tv_rname.setText(item);


        return convertView;
    }

    public class Holder {
        TextView tv_rname;


        ;
    }
}
